package com.liqi.system.domain;

import java.util.Date;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.liqi.common.annotation.Excel;
import com.liqi.common.core.domain.BaseEntity;

/**
 * 系统外发邮件列对象 sys_mail
 * 
 * @author ymh
 * @date 2022-03-14
 */
public class SysMail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long id;

    /** 邮件标题 */
    private String subject;

    /** 邮件体 */
    private String body;

    /** 邮件发送者邮箱 */
    private String mailFrom;

    /** 收件人地址列表，逗号分隔 */
    private String mailToList;

    /** 抄送者地址列表 */
    private String ccList;

    /** 3=成功发送，0=未发送，6=发送失败 */
    private String sendFlag;

    /** 发送错误信息 */
    private String sendInfo;

    /** 发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date sendTime;

    private String linkUrl;

    /** 0是正常，1失效 */
    private Long status;
    //附加，value 文件的绝对地址/动态模板数据
    private Map<String, Object> attachment;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setSubject(String subject) 
    {
        this.subject = subject;
    }

    public String getSubject() 
    {
        return subject;
    }
    public void setBody(String body) 
    {
        this.body = body;
    }

    public String getBody() 
    {
        return body;
    }
    public void setMailFrom(String mailFrom) 
    {
        this.mailFrom = mailFrom;
    }

    public String getMailFrom() 
    {
        return mailFrom;
    }
    public void setMailToList(String mailToList) 
    {
        this.mailToList = mailToList;
    }

    public String getMailToList() 
    {
        return mailToList;
    }
    public void setCcList(String ccList) 
    {
        this.ccList = ccList;
    }

    public String getCcList() 
    {
        return ccList;
    }
    public void setSendFlag(String sendFlag) 
    {
        this.sendFlag = sendFlag;
    }

    public String getSendFlag() 
    {
        return sendFlag;
    }
    public void setSendInfo(String sendInfo) 
    {
        this.sendInfo = sendInfo;
    }

    public String getSendInfo() 
    {
        return sendInfo;
    }
    public void setSendTime(Date sendTime) 
    {
        this.sendTime = sendTime;
    }

    public Date getSendTime() 
    {
        return sendTime;
    }
    public void setLinkUrl(String linkUrl) 
    {
        this.linkUrl = linkUrl;
    }

    public String getLinkUrl() 
    {
        return linkUrl;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public Map<String, Object> getAttachment() {
        return attachment;
    }

    public void setAttachment(Map<String, Object> attachment) {
        this.attachment = attachment;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("subject", getSubject())
            .append("body", getBody())
            .append("mailFrom", getMailFrom())
            .append("mailToList", getMailToList())
            .append("ccList", getCcList())
            .append("sendFlag", getSendFlag())
            .append("sendInfo", getSendInfo())
            .append("sendTime", getSendTime())
            .append("linkUrl", getLinkUrl())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
